﻿using Dapper;
using ZingBlog.Domain.IRepository;
using ZingBlog.Domain.Entities;
using System.Collections.Generic;
using ZingFrameworkCore.Data;
namespace ZingBlog.Repository
{
    public class ArticleTypeRepository : BaseRepository<ArticleTypeEntity>, IArticleTypeRepository
    {
        public IEnumerable<ArticleTypeEntity> GetArticleTypeList()
        {
            using (var conn = MySqlHelper.GetConnection())
            {
                var sql = "SELECT Id,Name from t_article_type";
                return conn.Query<ArticleTypeEntity>(sql);
            }
        }
    }
}
